import shutil

def print_poem_with_offset():
    # 获取终端宽度
    term_width = shutil.get_terminal_size().columns
    
    # 诗词内容
    title = "参观张文秋故居"
    author = "作者: 张军"
    content = [
        "深秋气爽艳阳天，一众诗翁谒故贤。",
        "巾帼山乡多毓秀，谢湾宅院久留连。",
        "践行主义艰辛史，续写神州红色篇。",
        "教导有方三凤育，联姻领袖两逢缘。"
    ]
    
    # 诗名和作者居中
    print(title.center(term_width))
    print()
    print(author.center(term_width))
    print()
    
    # 正文向左偏移2个字符（在居中基础上减少2个左侧空格）
    for line in content:
        # 计算居中时的左侧空格数，减去2后重新拼接
        center_pad = (term_width - len(line)) // 2
        left_pad = max(0, center_pad - 2)  # 确保不会出现负数
        print(' ' * left_pad + line)

# 执行打印
print_poem_with_offset()